package fr.upmc.alasca.centreCalcul.objets;

import java.io.Serializable;


/**
 * Représente une demande d'exécution d'application.
 * @author Antoine Lavaire, Sabri Labassi, Thibaut Fleury, Ryme Fantazi
 */
public	class	DemandeAdmission
implements		Serializable
{
	/* ------------------------------------------------------------- ATTRIBUT */
	private static final long serialVersionUID = 1L;

	protected	String	uriApplication;
	protected	String	nomApplication;
	protected	long	nbInstructions;
	protected	int		nbCoeursVoulus;
	protected	Integer	dureeValiditeRequeteMS;
	protected	Delais	tempsReponseMax;
	protected	Delais	tempsReponseMin;


	/* --------------------------------------------------------- CONSTRUCTEUR */
	public	DemandeAdmission
	(
		String	p_nomApplication,
		long	p_nbInstructions,
		int		p_nbCoeursVoulus,
		int		p_dureeValiditeRequeteMS,
		Delais	p_tempsReponseMax,
		Delais	p_tempsReponseMin
	)
	{
		super();

		assert p_nbInstructions > 0;
		assert p_dureeValiditeRequeteMS > 0;
		
		nomApplication = p_nomApplication;
		nbInstructions = p_nbInstructions;
		nbCoeursVoulus = p_nbCoeursVoulus;
		dureeValiditeRequeteMS = p_dureeValiditeRequeteMS;
		tempsReponseMax = p_tempsReponseMax;
		tempsReponseMin = p_tempsReponseMin;
	}


	/* ------------------------------------------------------------ ACCESSEUR */
	public	String	getUriApplication
	() {
		return uriApplication;
	}

	public	void	setUriApplication
	(
		String	p_idApplication
	) {
		uriApplication = p_idApplication;
	}

	public	String	getNomApplication
	() {
		return nomApplication;
	}

	public	long	getNbInstructions
	() {
		return nbInstructions;
	}

	public	int		getNbCoeursVoulus
	() {
		return nbCoeursVoulus;
	}

	public	Integer		getDureeValiditeRequeteMS
	() {
		return dureeValiditeRequeteMS;
	}

	public	Delais	getTempsReponseMax
	() {
		return tempsReponseMax;
	}

	public	Delais	getTempsReponseMin
	() {
		return tempsReponseMin;
	}
}
